from pydantic import BaseModel

from scaner.core.models.user import User


class ADSDataBase(BaseModel):
    title: str
    price: int | None = None
    currency: str | None = None
    descriptions: str
    url: str
    data_marker: str | None = None

    class ConfigDict:
        from_attributes = True


class ADSDataCreate(ADSDataBase):
    pass


class ADSDataRead(ADSDataBase):
    id: int


class SearchOrderBase(BaseModel):
    rubric_url: str
    query_string: str
    deep_pages: int = 2
    city: str = "kurgan"
    main_url: str = "https://www.avito.ru/"

    class ConfigDict:
        from_attributes = True


class SearchOrderCreate(SearchOrderBase):
    pass


class SearchOrderRead(SearchOrderBase):
    id: int


class TaskBase(BaseModel):
    task_name: str
